#include "Data/Data.hpp"

#include <algorithm>

Data::Data()
{
}

void Data::addObserver(Observer *obs)
{
    m_observers.insert(obs);
}

void Data::removeObserver(Observer *obs)
{
    m_observers.erase(obs);
}

void Data::updateNotification()
{
#if defined(_MSC_VER) && _MSC_VER <= 1600
	for (auto obs = m_observers.begin(); obs != m_observers.end(); ++obs)
        (*obs)->update();
#else
    for (auto obs : m_observers)
        obs->update();
#endif
}

Data::~Data()
{
}
